fail for custom tokens registered only via the deprecated ApiTokensGetTokenTypes
hook. The ApiQueryTokensRegisterTypes hook should be used for this to work.
* Added wgRelevantArticleId to the client-side config, for use on special pages.
+* Deprecated the TitleIsCssOrJsPage hook. Superseded by the
+ ContentHandlerDefaultModelFor hook since MediaWiki 1.21.
+* Deprecated the TitleIsWikitextPage hook. Superseded by the
+ ContentHandlerDefaultModelFor hook since MediaWiki 1.21.
== Compatibility ==
$title: The title in question.
&$types: The types of protection available.
-'TitleIsCssOrJsPage': Called when determining if a page is a CSS or JS page.
+'TitleIsCssOrJsPage': DEPRECATED! Use ContentHandlerDefaultModelFor instead.
+Called when determining if a page is a CSS or JS page.
$title: Title object that is being checked
$result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page.
Hooks may change this value to override the return value of
Hooks may change this value to override the return value of
Title::isMovable().
-'TitleIsWikitextPage': Called when determining if a page is a wikitext or should
+'TitleIsWikitextPage': DEPRECATED! Use ContentHandlerDefaultModelFor instead.
+Called when determining if a page is a wikitext or should
be handled by separate handler (via ArticleViewCustom).
$title: Title object that is being checked
$result: Boolean; whether MediaWiki currently thinks this is a wikitext page.
# @note This hook is also called in ContentHandler::getDefaultModel.
# It's called here again to make sure hook functions can force this
- # method to return true even outside the mediawiki namespace.
+ # method to return true even outside the MediaWiki namespace.
- wfRunHooks( 'TitleIsCssOrJsPage', array( $this, &$isCssOrJsPage ) );
+ wfRunHooks( 'TitleIsCssOrJsPage', array( $this, &$isCssOrJsPage ), '1.25' );
return $isCssOrJsPage;
}
}
// Hook can force JS/CSS
- wfRunHooks( 'TitleIsCssOrJsPage', array( $title, &$isCssOrJsPage ) );
+ wfRunHooks( 'TitleIsCssOrJsPage', array( $title, &$isCssOrJsPage ), '1.25' );
// Is this a .css subpage of a user page?
$isJsCssSubpage = NS_USER == $ns
$isWikitext = $isWikitext && !$isCssOrJsPage && !$isJsCssSubpage;
// Hook can override $isWikitext
- wfRunHooks( 'TitleIsWikitextPage', array( $title, &$isWikitext ) );
+ wfRunHooks( 'TitleIsWikitextPage', array( $title, &$isWikitext ), '1.25' );
if ( !$isWikitext ) {
switch ( $ext ) {